#ifndef __THREAD_H__
#define __THREAD_H__

#include <thread>
#include <vector>
#include <functional>

#include "server/TaskQueue.h"

using std::thread;
using std::vector;

typedef function<void()> ThreadCallback;

class Thread
{
public:
//private:
    Thread(ThreadCallback cb);
    ~Thread();
    void start();
    void stop();
    void join();

    template<typename... args>
    static void *threadFunc(args... arg);

public:
//private:
    thread th;
    
};

#endif